﻿// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
// Website: https://admin.blazor.zone

using BlazorAdmin.Models;
using System.Collections.Generic;

namespace BlazorAdmin.Interface
{
    /// <summary>
    /// 
    /// </summary>
    public interface IRole
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        List<Role> GetAll();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="groupId"></param>
        /// <returns></returns>
        List<int> GetRolesByGroupId(int groupId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="groupId"></param>
        /// <param name="roleIds"></param>
        /// <returns></returns>
        bool SaveRolesByGroupId(int groupId, IEnumerable<int> roleIds);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<int> GetRolesByUserId(int userId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="roleIds"></param>
        /// <returns></returns>
        bool SaveRolesByUserId(int userId, IEnumerable<int> roleIds);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="menuId"></param>
        /// <returns></returns>
        List<int> GetRolesByMenuId(int menuId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="menuId"></param>
        /// <param name="roleIds"></param>
        /// <returns></returns>
        bool SaveRolesByMenuId(int menuId, IEnumerable<int> roleIds);
    }
}